package com.opo5.logisticsmanagement.controller;


import com.opo5.logisticsmanagement.common.R;
import com.opo5.logisticsmanagement.service.VehicleTasksService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/tbsTasks")
@ResponseBody
@CrossOrigin
public class VehicleTasksController {
    @Autowired
    private VehicleTasksService vehicleTasksService;
    @GetMapping("/{date}")
    public R fn1(@PathVariable String date){
        R r = new R();
        int yy = Integer.parseInt(date.substring(0,4));
        int mm = Integer.parseInt(date.substring(5,7));
        int dd = Integer.parseInt(date.substring(8,10));
        r.setCode(200);
        r.setMsg("success");
        r.setData(vehicleTasksService.voList(yy,mm,dd));
        return r;
    }
}
